package com.meilai.project.dto.app;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.meilai.project.vo.app.UploadBackVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 张驰
 * @date 2021/11/8 13:37
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value="请求对象-工人提交", description="请求对象-工人提交")
public class WorkerSubmitDeviceDTO {
    @NotNull(message = "设备id不能为空")
    @ApiModelProperty(value = "设备id，公司唯一", required = true)
    private Long device_id;
    @NotNull(message = "设备code不能为空")
    @ApiModelProperty(value = "设备code，公司自定义编号，公司唯一，旧数据存在空", required = true)
    private String code;
    @ApiModelProperty(value = "设备nfc_code，可为空")
    private String nfc_code;
    @NotNull(message = "工单id不能为空")
    @ApiModelProperty(value = "工单id", required = true)
    private Long work_order_id;
    @NotNull(message = "楼盘id不能为空")
    @ApiModelProperty(value = "楼盘id", required = true)
    private Long building_area_id;
    @ApiModelProperty(value = "楼号")
    private String building_number;
    @ApiModelProperty(value = "单元号")
    private String unit_number;
    @ApiModelProperty(value = "层")
    private Integer floor;
    @ApiModelProperty(value = "楼栋类型，1多层，2高层")
    private Integer building_type;
    @NotNull(message = "媒体类型id不能为空")
    @ApiModelProperty(value = "媒体类型id", required = true)
    private Long media_type_id;
    @ApiModelProperty(value = "门号")
    private String door_number;
    @ApiModelProperty(value = "护栏号")
    private String rail_number;
    @ApiModelProperty(value = "销售单id")
    private Long contract_id;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "位置")
    private String location;
    @ApiModelProperty(value = "时间段id")
    private Long date_range_id;
    @ApiModelProperty(value = "媒体特点")
    private String media_feature;
    @ApiModelProperty(value = "尺寸-高度,cm")
    private String size_length;
    @ApiModelProperty(value = "尺寸-宽度,cm")
    private String size_width;
    @ApiModelProperty(value = "（非维修）是否存在故障，1是，0否。（维修）是否仍需维修，1是，0否")
    private Integer breakdown_type;
    @ApiModelProperty(value = "画面属性")
    private Long pic_type;
    @ApiModelProperty(value = "是否亮灯，0：不亮；1：亮灯")
    private Integer is_light;
    @ApiModelProperty(value = "保存时间，yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime saved_at;

    @ApiModelProperty(value = "故障原因")
    private List<Long> breakdown_type_ids;

    @ApiModelProperty(value = "照片List")
    private List<UploadBackVO> file_list;
}
